home *** CD-ROM | disk | FTP | other *** search
-
-
-
- BISON(1) USER COMMANDS BISON(1)
-
-
-
- NAME
- bison - GNU Project parser generator (yacc replacement)
-
- SYNOPSIS
- bison [ -b _f_i_l_e-_p_r_e_f_i_x ] [ --file-prefix=_f_i_l_e-_p_r_e_f_i_x ] [ -d
- ] [ --defines ] [ -l ] [ --no-lines ] [ -o _o_u_t_f_i_l_e ] [
- --output-file=_o_u_t_f_i_l_e ] [ -p _p_r_e_f_i_x ] [ --name-prefix=_p_r_e_f_i_x
- ] [ -t ] [ --debug ] [ -v ] [ --verbose ] [ -V ] [ --version
- ] [ -y ] [ --yacc ] [ --fixed-output-files ] file
-
- DESCRIPTION
- _B_i_s_o_n is a parser generator in the style of _y_a_c_c(1). It
- should be upwardly compatible with input files designed for
- _y_a_c_c.
-
- Input files should follow the _y_a_c_c convention of ending in
- .y. Unlike _y_a_c_c, the generated files do not have fixed
- names, but instead use the prefix of the input file. For
- instance, a grammar description file named parse.y would
- produce the generated parser in a file named parse.tab.c,
- instead of _y_a_c_c's y.tab.c.
-
- This description of the options that can be given to _b_i_s_o_n
- is adapted from the node Invocation in the bison.texinfo
- manual, which should be taken as authoritative.
-
- _B_i_s_o_n supports both traditional single-letter options and
- mnemonic long option names. Long option names are indicated
- with -- instead of -. Abbreviations for option names are
- allowed as long as they are unique. When a long option
- takes an argument, like --file-prefix, connect the option
- name and the argument with =.
-
- OPTIONS
- -b _f_i_l_e-_p_r_e_f_i_x
- --file-prefix=_f_i_l_e-_p_r_e_f_i_x
- Specify a prefix to use for all _b_i_s_o_n output file
- names. The names are chosen as if the input file were
- named _f_i_l_e-_p_r_e_f_i_x.c.
-
- -d
- --defines
- Write an extra output file containing macro definitions
- for the token type names defined in the grammar and the
- semantic value type YYSTYPE, as well as a few extern
- variable declarations.
-
- If the parser output file is named _n_a_m_e.c then this
- file is named _n_a_m_e.h.
-
- This output file is essential if you wish to put the
- definition of yylex in a separate source file, because
-
-
-
- Sun Release 4.1 Last change: local 1
-
-
-
-
-
-
- BISON(1) USER COMMANDS BISON(1)
-
-
-
- yylex needs to be able to refer to token type codes and
- the variable yylval.
-
- -l
- --no-lines
- Don't put any #line preprocessor commands in the parser
- file. Ordinarily _b_i_s_o_n puts them in the parser file so
- that the C compiler and debuggers will associate errors
- with your source file, the grammar file. This option
- causes them to associate errors with the parser file,
- treating it an independent source file in its own
- right.
-
- -o _o_u_t_f_i_l_e
- --output-file=_o_u_t_f_i_l_e
- Specify the name _o_u_t_f_i_l_e for the parser file.
-
- The other output files' names are constructed from _o_u_t_-
- _f_i_l_e as described under the -v and -d switches.
-
- -p _p_r_e_f_i_x
- --name-prefix=_p_r_e_f_i_x
- Rename the external symbols used in the parser so that
- they start with _p_r_e_f_i_x instead of yy. The precise list
- of symbols renamed is yyparse, yylex, yyerror, yylval,
- yychar, and yydebug.
-
- For example, if you use -p c, the names become cparse,
- clex, and so on.
-
- -t
- --debug
- Output a definition of the macro YYDEBUG into the
- parser file, so that the debugging facilities are com-
- piled.
-
- -v
- --verbose
- Write an extra output file containing verbose descrip-
- tions of the parser states and what is done for each
- type of look-ahead token in that state.
-
- This file also describes all the conflicts, both those
- resolved by operator precedence and the unresolved
- ones.
-
- The file's name is made by removing .tab.c or .c from
- the parser output file name, and adding .output
- instead.
-
- Therefore, if the input file is foo.y, then the parser
- file is called foo.tab.c by default. As a consequence,
-
-
-
- Sun Release 4.1 Last change: local 2
-
-
-
-
-
-
- BISON(1) USER COMMANDS BISON(1)
-
-
-
- the verbose output file is called foo.output.
-
- -V
- --version
- Print the version number of _b_i_s_o_n.
-
- -y
- --yacc
- --fixed-output-files
- Equivalent to -o y.tab.c; the parser output file is
- called y.tab.c, and the other outputs are called
- y.output and y.tab.h. The purpose of this switch is to
- imitate _y_a_c_c's output file name conventions. Thus, the
- following shell script can substitute for _y_a_c_c:
-
- bison -y $*
-
-
- The long-named options can be introduced with `+' as well as
- `--', for compatibility with previous releases. Eventually
- support for `+' will be removed, because it is incompatible
- with the POSIX.2 standard.
-
- FILES
- /usr/local/lib/bison.simple simple parser
- /usr/local/lib/bison.hairy complicated parser
-
- SEE ALSO
- _y_a_c_c(1)
- The _B_i_s_o_n _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, included as the file
- bison.texinfo in the _b_i_s_o_n source distribution.
-
- DIAGNOSTICS
- ``Self explanatory.''
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sun Release 4.1 Last change: local 3
-
-
-
-